package com.springclouddemo.eurekaclientconsumerfeinconfiguraton.config;

import feign.Contract;
import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 何昌杰
 */
@Configuration
public class FeignConfiguration {
    /**
     * 将契约修改为Feign原生契约
     * @return Contract
     */
    @Bean
    public Contract feignContract(){
        return new Contract.Default();
    }

    /**
     * 配置Logger.Level的日志记录等级
     * @return Level
     */
    @Bean
    Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }
}
